module.exports = function($scope, $modalInstance,$resource, product, id, $q,$http){
    console.log(product);
    $scope.product = product;
    $scope.save = function(){
        $resource('/api/as/wc/product/update', {}, {}).save($scope.product, function (res) {

        });
        $modalInstance.close();
    }
    $scope.cancel = function () {
        $modalInstance.close();
    }
};